<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>担保人列表</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div id="ligergrid1" class="sq-grid"></div>
</div>

<script type="text/javascript">
    var grid = null;
    var prjId = '${prjId}';
    var purpCd = '${purpCd}';
    $(function () {
        grid = $("#ligergrid1").ligerGrid({
            url: '<%=path%>/project/prjcstbscInfo/initList.do',
            parms:{'prjId':prjId,
            'cstRlTyp':2},
            method: 'get',
            columns: [
                {display: '客户名称', name: 'cstNm', minWidth: 100, align: 'left', enabledSort: false,},
                {display: '客户类型', name: 'cstTypCdNm', minWidth: 100, align: 'center', enabledSort: false,},
                {display: '证件/组织机构代码', name: 'certNo', minWidth: 100, align: 'left', enabledSort: false,},
                {display: '操作',
                    isSort: false,
                    width: 100,
                    render: function (rowdata, rowindex, value) {
                        var h = '<a class="sq-button-hasicon" href="javascript:chooseCstRow(';
                        h += "'" + rowdata.cstId + "'";
                        h += ')"><i class="sqBtnIco_3"></i>选择</a>'
                        return h;
                    }
                }
            ],
            pageSize:10,
            root:'rows',
            record:'total',
            hideLoadButton : true,
            width: '100%',
            height:'100%',
            heightDiff:-2,
            checkbox:false,
            rownumbers:true
        });
        grid.setHeight(100);
    });

    //按钮在页面外的Dialog里，给Dialog绑定事件 （onOk 和 onCancel）
    function chooseCstRow(cstId) {
        parent.$("#cstDbrId"+purpCd).val(cstId);
        frameElement.dialog.hide();
    }

</script>

</body>
</html>
